package com.lnsf.bookstore.system.user.dao;

import com.lnsf.bookstore.system.user.vo.UserRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface UserRoleMapper extends Mapper<UserRole>{
    /**
     * 根据用户Id查询角色Id
     * @param userId
     * @return
     */
    List<Integer> listRoleIdByUserId(@Param("userId") Integer userId);

    int saveOrUpdate(Map<String, Object> map);

    int deleteByUserId(Integer userId);
}